package com.yc.cloud.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yc.cloud.common.orm.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * <p>
 * 设备录像记录表
 * </p>
 *
 * @author kinggu
 * @since 2025-01-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("hw_device_video_record")
public class HwDeviceVideoRecord extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 设备ID
     */
    @TableField("device_id")
    private Long deviceId;

    /**
     * 流ID (sipUsername_videoChannel)
     */
    @TableField("stream")
    private String stream;

    /**
     * 录制开始时间
     */
    @TableField("start_time")
    private LocalDateTime startTime;

    /**
     * 录制结束时间
     */
    @TableField("end_time")
    private LocalDateTime endTime;

    /**
     * 录制时长(秒)
     */
    @TableField("duration")
    private Integer duration;

    /**
     * 文件大小(字节)
     */
    @TableField("file_size")
    private Long fileSize;

    /**
     * 原始文件路径
     */
    @TableField("original_file_path")
    private String originalFilePath;

    /**
     * 文件ID(关联oss_file表)
     */
    @TableField("file_id")
    private String fileId;

    /**
     * 缩略图文件ID(关联oss_file表)
     */
    @TableField("thumbnail_file_id")
    private String thumbnailFileId;

    /**
     * 摄像头ID(关联hw_camera表)
     */
    @TableField("camera_id")
    private Long cameraId;

    public static final String DeviceId = "device_id";
    public static final String Stream = "stream";
    public static final String StartTime = "start_time";
    public static final String EndTime = "end_time";
    public static final String Duration = "duration";
    public static final String FileSize = "file_size";
    public static final String OriginalFilePath = "original_file_path";
    public static final String FileId = "file_id";
    public static final String ThumbnailFileId = "thumbnail_file_id";
    public static final String CameraId = "camera_id";
}
